﻿using System.Configuration;

namespace iApprove.BE
{
    // Ref: http://codereview.stackexchange.com/questions/186/getting-setting-default-values-from-my-app-config
    //      http://joelabrahamsson.com/creating-a-custom-configuration-section-in-net/
    //      http://haacked.com/archive/2007/03/12/custom-configuration-sections-in-3-easy-steps.aspx/

    public class AppEntity : ConfigurationSection
    {

        private static AppEntity settings =
                   ConfigurationManager.GetSection("ppConfigurator") as AppEntity;

        public static AppEntity Settings
        {
            get { return settings; }
        }

        [ConfigurationProperty("applicationName"
            , IsRequired = false)]
        public string ApplicationName
        {
            get { return (string)this["applicationName"]; }
            set { this["applicationName"] = value; }
        }

        [ConfigurationProperty("developmentTeam"
            , IsRequired = false)]
        public string DevelopmentTeam
        {
            get { return (string)this["developmentTeam"]; }
            set { this["developmentTeam"] = value; }
        }

        [ConfigurationProperty("help01SupportTeamInfo"
            , IsRequired = false)]
        public string Help01SupportTeamInfo
        {
            get { return (string)this["help01SupportTeamInfo"]; }
            set { this["help01SupportTeamInfo"] = value; }
        }

        
        [ConfigurationProperty("applicationDescription", IsRequired = false)]
        public string ApplicationDescription
        {
            get { return (string)this["applicationDescription"]; }
            set { this["applicationDescription"] = value; }
        }

        [ConfigurationProperty("newTicket01standardSLA", IsRequired = false)]
        public string NewTicket01StandardSLA
        {
            get { return (string)this["newTicket01standardSLA"]; }
            set { this["newTicket01standardSLA"] = value; }
        }
    }
}
